<%= javascript_include_tag "prototype" %>
<%= javascript_include_tag "util" %>
<script language="JavaScript" type="text/JavaScript">
        function checkNull(flag, msg_id, obj_id, msg_text){
                if (flag) {
                        if ($(obj_id).value == "")
                        {
                                $(msg_id).innerText = msg_text;
                                $(msg_id).style.display = "block";
                                return false;
                        }
                        else return true;
                }
                else {
                        $(msg_id).style.display = "none";
                }
        }
	function checkForm(){
                return checkNull(true,'id_name','department_name','请输入部门名称') ;
	}
</script>
<h1>部门管理 - <span id="secondHeading">修改部门信息</span></h1>
<form id="input-form" name="departmentForm" action="/adminorg/edit_department" method="post">
<TABLE border="0" id="INPUT_TABLE">
	<TR>
		<input type="hidden" id="department_id" name="id" value="<%=@department.id%>">
		<TD>部门名称：</TD>
		<TD><input id="department_name" name="name" size="30" type="text" value="<%=@department.name%>"  maxlength="20" size="30" onfocus="checkNull(false,'id_name')" onblur="checkNull(true,'id_name',this.id,'请输入部门名称')"/>          <em>*</em><div class="redNsg" id="id_name" style="display:none;"></div></TD>
	</TR>
	<TR>
		<TD>备注：</TD>
		<TD><textarea cols="50" id="department_memo" name="memo" rows="5"><%=@department.memo%></textarea></TD>
	</TR>
	<TR>
		<TD colspan="2" align="right">
		<input type="submit" value="修改" class="sub" onclick="javascript:return checkForm();">&nbsp;OR&nbsp;<input type="reset" value="重新填写" class="cal"></TD>
	</TR>
</TABLE>
<p class="note"> <strong class="alert">注意：</strong><br/>
 一、有 <em>*</em> 标记的是必填项。
 </p>
</form>	
